package com.lean.plugin.network


/**
 * 返回给UI层的数据结构
 */
sealed interface Result<out T> {

    data class Success<T>(val data: T) : Result<T>

    data class Error(val error: BusinessException) : Result<Nothing> {
        companion object {
            const val ERROR_BUSINESS = -100
        }
    }

    data class Loading<T>(val data: T? = null) : Result<T>
}

